package android.vstore.custom;

import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.vstore.fragment.BaseFragment;

public class AppSectionsPagerAdapter extends FragmentPagerAdapter {
	ArrayList<Fragment> lstFrags;
	public AppSectionsPagerAdapter(FragmentManager fm, ArrayList<Fragment> lstFrags) {
		super(fm);
		this.lstFrags = lstFrags;
	}

	@Override
	public Fragment getItem(int i) {
		return lstFrags.get(i);

	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return lstFrags.size();
	}



	@Override
	public CharSequence getPageTitle(int position) {

		return ((BaseFragment)lstFrags.get(position)).name;
	}

}  
